package com.fuhan.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * @Author: Chao
 * @description:
 * @Date: 2021/1/28 15:18
 */
@Component
public class TokenConfig {
    public static long TOKEN_TTL;

    @Value("${token.ttl}")
    private long tokenTtl;

    @PostConstruct
    public void setTokenTtl() {
        // TOKEN_TTL = Long.parseLong(tokenTtl);
        TOKEN_TTL = tokenTtl;
    }
}
